﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IT_Project_Monopoly
{
    public partial class GamePannel : System.Web.UI.UserControl
    {
        public void setPlayerInfo(string playerName, float playerStartMoney, int playerStartPoints, string playerImageSrc)
        {
            this.pInfo.PlayerAvatar = playerImageSrc;
            this.pInfo.PlayerName = playerName;
            this.pInfo.PlayerMoney = playerStartMoney;
            this.pInfo.PlayerPoints = playerStartPoints;
        }

        /**************** Player Info *******************/

        public string getPlayerName()
        {
            return this.pInfo.PlayerName;
        }

        public float PlayerMoney
        {
            set
            {
                this.pInfo.PlayerMoney = value;
            }
            get
            {
                return this.pInfo.PlayerMoney;
            }
        }

        public int PlayerPoints
        {
            set
            {
                this.pInfo.PlayerPoints = value;
            }
            get
            {
                return this.pInfo.PlayerPoints;
            }
        }

        public int RollCount
        {
            set
            {
                this.pInfo.RollCount = value;
            }
            get
            {
                return this.pInfo.RollCount;
            }
        }

        public string GameTime
        {
            set
            {
                this.pInfo.GameTime = value;
            }
            get
            {
                return this.pInfo.GameTime;
            }
        }

        /**************** Player Info *******************/


        
        /**************** Game Controls *******************/

            //ClickListener za site kopcinja koi ke povikuvaat web servisi

        /**************** Game Controls *******************/

        
        
        /**************** Player List *******************/

        public void addPlayer(string name, float money, int points)
        {
            this.pList.addPlayer(name, money, points);
        }

        public void activateNext()
        {
            this.pList.activateNext();
        }

        public PlayerListItem getActivePlayer()
        {
            return this.pList.getActivePlayer();
        }

        public int getActiveIndex()
        {
            return this.pList.getActiveIndex();
        }

        /**************** Player List *******************/

        
        
        /**************** Mortgage List *******************/
        
        public void AddMortgage(string mortgage, string time)
        {
            this.mList.addMortgage(mortgage, time);
        }

        public void RemoveMortgage(string mortgage)
        {
            this.mList.removeMortgage(mortgage);
        }

        /**************** Mortgage List *******************/



        /**************** Bank Log *******************/

        public void AddLog(float amount, string time)
        {
            this.bLog.addLog(amount, time);
        }

        /**************** Bank Log *******************/
    }
}